<template>
  <div>
    <van-nav-bar title="地铁资讯" left-text="返回" left-arrow @click-left="back" />

    <ul>
        <li v-for="item in list"  :key="item.id" @click="news(item)">
            {{item.name}}
        </li>
    </ul>
        
    

  </div>
</template>

<script>
import {infoget} from "./Service"
import mixin from  "@/mixin/flag";
export default {
    mixins:[mixin],
    data(){
        return{
            list:[],
            listdata:[],
            active:0,
        }
    },
    methods:{
        back(){
            this.$router.go(-1);
        },
        news(item){
        this.$router.push(`/metro_query/info/list/${item.id}`)
           
        }
    },
    async created(){
        let res = await infoget();
        console.log(res);
        this.list=res.data.data
    }
}
</script>

<style lang="scss" scoped>
ul{
    padding:20px;
    li{
        width: 100%;
        height: 80px;
        border:1px solid #666;
        margin-bottom: 20px;
        border-radius: 5px;
        line-height: 80px;
    }
}

</style>